
#import "SEGOwesBilModel.h"
@implementation SEGOwesBilModel
- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
- (instancetype)init
{
    self = [super init];
    if (self) {
        _ruleId = @"";
        _billDetail = [NSArray<SEGOwesBillDetailModel*> array];
        _ruleName = @"";
        _communityId = @"";
        _acctAmount = @"";
        _houseId = @"";
        _disInfo = [NSArray<SEGOwesDisInfoModel*> array];
        _disAmount = @"";
        _payAmount = @"";
    }
    return self;
}
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{
}

- (void)setValue:(id)value forKey:(NSString*)key
{

    if ([key isEqualToString:@"billDetail"]) {
        NSMutableArray* _arrM = [NSMutableArray array];
        for (NSDictionary* dict in value) {
            SEGOwesBillDetailModel* model = [SEGOwesBillDetailModel initWithDictionary:dict];
            [_arrM addObject:model];
        }
        _billDetail = _arrM.copy;
        return;
    }

    if ([key isEqualToString:@"disInfo"]) {
        NSMutableArray* _arrM = [NSMutableArray array];
        for (NSDictionary* dict in value) {
            SEGOwesDisInfoModel* model = [SEGOwesDisInfoModel initWithDictionary:dict];
            [_arrM addObject:model];
        }
        _disInfo = _arrM.copy;
        return;
    }

    [super setValue:value forKey:key];
}

- (void)setRuleId:(NSString*)ruleId
{
    _ruleId = [[SEGUtils ValueToString:ruleId] copy];
}
- (void)setRuleName:(NSString*)ruleName
{
    _ruleName = [[SEGUtils ValueToString:ruleName] copy];
}
- (void)setCommunityId:(NSString*)communityId
{
    _communityId = [[SEGUtils ValueToString:communityId] copy];
}
- (void)setAcctAmount:(NSString*)acctAmount
{
    _acctAmount = [[SEGUtils ValueToString:acctAmount] copy];
}
- (void)setHouseId:(NSString*)houseId
{
    _houseId = [[SEGUtils ValueToString:houseId] copy];
}
- (void)setDisAmount:(NSString*)disAmount
{
    _disAmount = [[SEGUtils ValueToString:disAmount] copy];
}

- (void)setPayAmount:(NSString*)payAmount
{
    _payAmount = [[SEGUtils ValueToString:payAmount] copy];
}
@end
